package com.ssi.report.common.utils;

/** 
 * 
 * 	Developed By 	: Kroekpong Sakulchai
 *  Date 			: 09-MAY-2014
 *  Version 		: Alpha
 *  Team			: Software Solution And Integration
 *   
 * **/

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;

public class SSDirectoryUtil {
	
	public static boolean existDirectory(String dir) {
		try {
			File fileDir = new File(dir);
			if (!fileDir.exists()) {
				FileUtils.forceMkdir(fileDir);
			} else {
				FileUtils.cleanDirectory(fileDir);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		return false;
	}
		
}
